
const phoneReg = /^1[3|4|5|6|7|8|9][0-9]{9}$/
const phone = (val) => {
	if((val ?? '') == '') {
		return '手机号不能为空'
	}
	if(!phoneReg.test(val)) {
		return '手机号格式错误'
	}
	return 0
}

const code = (val) => {
	if((val ?? '') == '') {
		return '验证码不能为空'
	}
	return 0
}

export default {
	phone
}